http://www.wc3sear.ch/index.php?p=Maps&ID=8736&sid=c02f0dadcf2e1a8e8fce6a40582022e6




=========================Introduction=========================
This system uses GUI and Jass triggers made for RPG maps.
They are easy to import into your map.
The system containts:
1*Damage Detect System
2*Camera System
3*Chat System
4*Creep Respawn System
5*Simple Dialog Work
6*Save System

Any triggers used from here in your map, should contain credit to it's creator.


1.=====Damage Detect System=====
(Created by shadow1500, Local Hande Vars by KaTTaNa)

This system is a classical MMORPG feature. Whenever a hero attacks a unit, a floating text will be created above 
the attacked unit containing the "Damage Taken".
Contains 3 Triggers.

-Detect Damage Init (GUI)
-Detect Damage Events (JASS)
-Detect Damage (GUI)

1. Copy code in custom script section to map, do not copy H2I function or the Handle Vars if you already have them in the map.
2. Copy init trigger, make sure DmgDetectTrigger points to the trigger that will recive detected damage calls.
3. Copy Detect Damage Events trigger.
4. Copy Detect Damage trigger.

Variables - 
DmgDetectTrigger = the trigger that "Detect Damage" trigger requires.
TempPoint= Position of the Attacked Unit


2.=====Camera System=====
(Created by VIRUS_OF_MADNESS, minor fixes by Freakazoid)

A camera system that let's you control the camera and at the same time let's you use the
keyboard movement.

Comtains 30 triggers. All In GUI

-Esc Turn-> Detects the position the attacker for each player for further use. (Deactivates after 10 seconds)
-Trigger Esc Turn-> When a player presses the "ESC" key, he will automaticly face the point of the "Detected Point" from the "Esc Turn" trigger.
-Selected Unit-> Detects the unit that your camera want's to follow
->Deselect Unit-> Resets the camera and clears your selection
->Reset Camera-> When you use your "Reset" ability your camera will be reseted :)
-Auto Reset-> Required for the "Reset Camera" trigger
-Camera Looking ON-> Enables camera looking when you use your "Enable Camera Look" ability.
-Camera Looking OFF-> Disables camera looking,...
-Camera Looking-> The main Camera Looking trigger, sets your camera how you want it.
-Correct AoA-> This trigger disables unit to look too much up or too much down.
-Moving Unit Setup-> Sets the "MovingUnit" variable to no unit at the map start, so the camera won't be screwed when you start.
-Turning Speed-> Sets how fast the "MovingUnit" is going to turn, not how fast is going to walk. Base=8, if you want it to be 2 times faster set 
set it to 116.
-Unit Dies-> When the "MovingUnit" dies the camera will be reset.
-Right Pressed-> Detects when the Right Arrow key is pressed.
-Up Pressed-> Detects when the Up Arrow key is pressed.
-Left Pressed-> Detects when the Left Arrow key is pressed.
-Down Pressed-> Detects when the Down Arrow key is pressed.
-Right Released-> Detects when the Right Arrow key is released.
-Up Released-> Detects when the Up Arrow key is released.
-Left Released-> Detects when the Left Arrow key is released.
-Down Released-> Detects when the Down Arrow key is released.
-Activate Looking Mode-> When you use the "Looking Mode" ability, it will disable the walking mode and enable the looking mode.
-Activate Walking Mode-> When you use the "Walking Mode" ability, it will disable the looking mode and enable the walking mode.
-Movement-> Now heres the Magic, this trigger is the reason for the ALL triggers above, this moves the unit by detecting those Arrow Keys
-Initalization-> Sets your "DefaultAoA[]" variable, and sets your Abilities
-Apply First Person-> Sets your camera, Distance, Far Z, Angle of Attack, Field of View,....
-Quick Turn Right-> When you quickly press Right Arrow Key twice, unit will move 90 to the right.
-Quick Turn Left-> When you quickly press Left Arrow Key twice, unit will move 90 to the left.
-Quick Turn Right Success-> When you quickly press Right Arrow Key twice, unit will move 90 to the right.
-Quick Turn Left Success-> When you quickly press Left Arrow Key twice, unit will move 90 to the left.

Variables - 

Camera_AoA - Angle of Attack
Camera_DistanceToTarget - Distance to Target
Camera_FarZ - FarZ
Camera_FieldOfView - Field of View
Camera_Height - Height
Camera_Roll - Roll
Camera_Rotation -  Rotation
DefaultAoA - Default Angle of Attack (Reset)
LookingIsON - Detects when LookingMode is on or off
WalkingModeActive - Detects when the Walking Mode is on or off
ZZ_RIGHT_Pressed - Detects when the RAK is pressed
ZZ_UP_Pressed - Detects when the UAK is pressed
ZZ_LEFT_Pressed - Detects when the LAK is pressed
ZZ_DOWN_Pressed - Detects when the DAK is pressed
Attacker - Detects the attacking unit in "Esc Turn" trigger
AutoResetIsOn - Detects when the "Auto Reset" trigger is lauched

3.=====Chat System=====
(Created by Freakazoid)

A chat system that shows the text you writen above your hero(unit).

Contains 3 triggers.

-Deselect UNIT2-> Deselects your hero when you use the "Deselect Unit" ability
-Chat-> Generates the text you writen above your hero.
-MoveDamnChat-> Moves the floating text as your hero moves.

Variables - 

Speech - Text entered by a player
Floating text - the floating text the will be moved, and will disapear in 4 seconds.
MovingUnit - Also used in the camera system

4.=====Creep Respawn=====
(Created by Freakazoid)

When a neutral hostile unit dies it will be respawned there IF there are no heros around.

No variables needed.

You can change the player in the events and the time required a unit to respawn (40.00 seconds, default)

5.=====Dialog Stuff=====
(Created by Freakazoid)
A dialog that will pop up on the map Init and ask you if you want to create a new char, or load one.

Contains 2 Triggers -

-Init-> Creates a Dialog and shows it
-DialogButtons-> When you click a Dialog button, it does some,... stuff. Really Simple.

Variables-
Dialog = The Dialog
DialogButton[1,2] = Sets your dialog buttons, 1 and 2 are the number of you buttons.

6.=====Save System=====
(Created by Freakazoid)

When you use your "Save" ability your character will be saved into the game cahce.

Containts 2 triggers.

-Reload Cache-> Loads the cache from your computer the map
-Save-> Saves your character when you use "Save"

The Path is PlayerName + NameOfYourMap.

Variables-
Uses MovingUnit from the Chat and Camera system.

7.====Stat System====
Requires all triggers. Lumber and "Str, Agi, Int gain Abilities"

You can change the lumber gain per level.

Requires no variables.

--Freakazoid--